Latest develop into master

Fixes #2 and lots of other goodies