Implementation of output methods (emit_status, calc_stat), improvement of the parsing function and data structures.