Views: Refactored out common code
Reduced filesize by 40%, and its more readable and consistent too