Modularize analysis code
Merge pull request #8 from sortega/refactor

Modularize analysis code