tidying up clicked.js