Big refactor step2