Step 2: Application Setup Code
Step 3: database connections
Add init_db method and fix typos