Refactored over complicated templates