36 pause menu

closes #36 
Also tidied the JS.