Refactored view structure and added mail template into views