lots of changes...

changed mongo lib usage
only use 1 db w/multiple collections
use config lib/directories
don't access map js member vars directly