Fix and clean a lot of stuff.