Added -dbi flag to create database.
Minor changes