Finish iteration1 refactoring