Started on refactor