Refactoring. Now that we support multiple assessments, modularise the code.