Some small refactoring and bump version to 0.9.3