Added typechecking for procedure calls and variable assignments.