Bug smashing and cleanup.