Minor cleanup and fixes

Also updates JavaScript version