js: tidy up of my js