AJAX + client UI

Contains AJAX routines for server communication plus code for all UI interaction.