Added some tests, and fixed a testing bug.