Modified the way that keys are generated. There is no base key now, and only one key is active at any time.