various cleanups and fixes for javascript related to compression