Fixed a lot of issues.