Fixed some issues. It should be pretty much good to go.

I still should probably rewrite some stuff, but that's no big deal, really.