initial version
Added documentation
clean up source