Yet more refactoring, now with answer template.