Tidying up

Added util.js and formalized our Javascript underneath body tag.