Reorganize templates, fix navbar selection issues, fix anchor dependency on template loading