Refactor analysis tools
Fixing imports