Refactoring and bump to 0.3