Clean up dead JS code