Made code niced in "analysis.c"