Clean up more legacy code