Slightly update (excellent) pit parsing code