Added procedure definition type checks (return types etc)