Working on AJAX template selector