Started refactoring
merge