Added types to the major functions in TypeCheck.hs for readability