Fixed a huge bunch of bugs.