small js cleanup