Rewrote analyzer.d, added a few unittests and added choice of correlation method in CLI