Refactored some backend templates