Rewrite refactor
Start to refactor index
Add getDbStats
Tests improvements
Manage env var to have Unit test runnings