initial commit. Untested code pulled from other codebase & refactored.