Corrected a small bug in update of js, and some file cleanup