Fixed a ton of errors and bugs. Still more.