Moved templates from inline to separate files