cleaned up JS formatting