Made some changes so the app works with db