Added some comments, removed some test code.