Refactor - move some code.