Move pattern matching for hand types to constant procs
Add type identification for two pair and corresponding test
Fix codepoint number conversion