Some refactors and analyzer basic and analyzer advanced