Cleanups and improved JS coverage