Unify parsing functions, create struct ProblemData