Simplify generated JS module code