reset head on each trace-back
easier function application
simplify code
split up parsing code into different packages