Adding a first naive version of key generator.
Adding a little bit more intelligence.