Got rid of class implementation, turned tparse into a function