a bit of refactoring in card generator
still some cleanup required
strange  enough -> found some bugs that were not visible previously ?!