Added preliminary docs and a few small fixes
Changing to a module for submission to pypi

mend