Fixed the build for windows
Moved methods to source files.

Closing issue #51