Fix controller, update templates