Refactoring for 0.4