refactor reporting bit
New version, uses SQLite in memory.