Added faking the database and some more tests