split lib, config, and test from main

Doing so in preparation for switching tests to use Mocha