Parsing code in seperate class