Minor improvements and compatibility fixes after testing on Windows.
Added setup.py file to enabled distribution.