Bugfixes, making it ready for deployment (0.5.0)