Fixed issue with NPE when creating full names
Added equals() test
Switched state to use template in toCode()