Moved the content from template_filters to helpers
Added an perm_ prefix in front off all permission checks
Use the permission check functions defined in helpers instead of the check_perm function
Fixed a few bugs