Moved parsing to its own subroutine and defined a few more classes