Refactored large if statements + added alt views for emails