moving database settings to __init__.py and refactoring tutorial.md