Added more database functionality.