Fix lots of general stupidity.