add spec tests, clean up db