Refactoring to modules
Merge branch 'master' into refactor_modules