Added auto creating database functionality