extract mongo connection to separate file
extract api to separate file
Merge pull request #3 from maciekbb/add_unit_tests

Extract mongodb and api to separate files