Moved database functions to their own file
Renamed cli to command line
Changed HTTP initialization method
Added JSON format check to the mig response parsing