Use SecureRandom insteaf of Random
Fix a few bugs reported by FindBugs, make the listing of card registry more ugly but "better readable" in code.