Added some documentation and an initial set of test code