Fixed a bunch of stuff.
Fix conflict with Kevin's changes.