Woakas/refactor branch