Refactor into analyzer package.
Refactor into alg package.