Added mongoose database layer