Created a Python module; reworked documentation and tests