Fix jQuery errors on update and remove unused base template code