fixed String comparisons
fixed problems with key generation
fixed spelling mistakes