Use test/default.py
Import db only in extensions.
Refactor changes