Merge pull request #4 from awm/master

MSVC support and other Windows fixes
Some refactoring and documentation cleanup.
Modified error printing.