Added a test to check the webserver runs the supplied function and refactored the templates a bit.