Added getCode() method.