restructuring for unit test accessibility
replaced 'mocha' test invocation with 'npm test' for stability
hackery
implemented unit testing and tested database type mapping
refactoring