Refactoring the code base to support the correct workflow