Make some code prettier, correct a few minor errors.