Fixed error handling.
Code cleanup.
Updated README.
Added Cygwin-based fork support for Windows.