some js cleanup