code repo refactor