Use hook template_fetch_template
Remove LOWER for better performance
Allow for duplicate segments in URI
Added setting ignore_pagination
Cleaner table names