some js cleanups