added missing type signatures

moved the data structures in ParseYarn to the top