Fixed a boat load of bugs.
Fixed even more bugs.