More docstrings, order functions for readability.
Restructure for setuptools.

Now you can install with
python setup.py install