first refactoring finished
Merge branch 'Code-refactoring'