For review only

Hi Fran I've moved the JS into static & put the details into database tables. Further comments welcome.