Working on a refactor