Fixed command line support and done the initial db migration