Fixes #2
Various fixes