Update keygen method placement