Jsfmt fixes

Addresses #418 partially