tidying up the js variables