Fixed a few bugs. Still not working.