Added some unit testing.