Added documentation and simple test program