Fixed a couple of failing unit tests and some minor changes (mostly typos).