Beginning of the refactor