Issue 9: Completed refactoring so that the work for #3 can be carried out