Adding a getCode method in preparation for refactoring to support arrays.