Develop

Fixes for #22, #21, #20, #19, and #6.