Small tweak to code so that database isn't passed to back end anymore.