Refactoring + fix test
First version Analysis-tool