Fixed CardInfoHandler to have declared generic types in its iterators, also closed resource leak