[Global] Additional refactorizations and cleanups
[Global] Change version to 0.5.0 for release