Structured code to suit distutils for packaging.
Introduced setup.py.
Some other minor stuff.