Ajax loading for templates