Dev into master

Fixes issue 10 and issue 11.