updated to latest codebase
Reorg for easier cross-platform deployment