Continuing work from #28 and #203
Continuing work from #28 and #203