Begin refactor