Some Opimizations and Stuff

There's still a fatal crash error though, apparently related to garbage
collection and C code or something. Not really sure how to fix it.