Added method parsing to NewMain