Minor changes to the back end - Working front end JS

Signed-off-by: Matthew Rayner <matt@mattrayner.co.uk>