Clean up some trivial errors and minor typos that would have stopped things working as expected.