0.4 branch started with lots of changes and refactoring