Fixed a few unforseen bugs and smoothed out a few odd quirks.