Fixed a number of small issues.