Added basic database functionality.