Begin to refactor