Fix up compilation errors from refactor. Fix issues found running unit tests. Refactor some Erlang code
now that Windows is supported, including removing separate paths (in Erlang) for Unix for Windows.