Beginning refactor