Fixed a lot of bugs. Too many to count.