Refactor to master