Fix lots of problems with last commit.