fixed an issue where generateCard was deleting the whole distribution
map

fixed an issue with removeCard where keys were not removed from the
distribution map

changed remaining HashMaps to TreeMaps