New features

Fixes #2, #3, #4 #5 and #6