Added database setup and global database object for application