updated code and template tables, match table still old
adding a scan of the pyramid template codes