Fixed a lot of different bugs. But still have many problems.