Issue #9: Fixed a bunch of bugs.

Since Siyu's code wouldn't compile, there was no way for me to compile
any of my code to see if it would. Now that I moved the test suite to a
subfolder, I simply created a separate project for it, and now I can
actually compile the tests.

When I did, I discovered a whole slew of bugs all over the place. I've
fixed what I found.