Implemented createCodeSet(), newCode(), and added a printCodeSet as a
convenience function for testing