Aligns code
Adds global db connection and simple queries.
Adds configuration  table to DB. Updates schema.