terminal_codes and nonterminal_codes now use shMap

Signed-off-by: Shahbaz Youssefi <ShabbyX@gmail.com>