v0.5.0 release, refactoring and feature additions