Release 0.3

Fix bugs + refactoring so bugfix is not a hack