Some refactoring, minor fixes
Removed some warnings and unused code
Merge branch 'origin/0.3'
Updated version number