More JS housekeeping