Added master and auto key gen