Initial templates and some ajax functionality