Cleaned up the custom template filters.