Fixed a lot of bugs. Closer to working fully now.