implemented as namespaced classes and added string->codes functionality
added ::codes test