Refactored parse_pda_line and changed Transition to namedtuple