Modified js to allow us to access functions, also did some mild arty
things.