0.5 Code refactoring