tidying js