move analyzer to its own module