refactored all domain templates