Refactored into templates, finished assignment to spec