Fixed a variety of little bugs.