Refactor method parser.