tidy up, and comments on JS code
prepare for DB migration