added global keystore, guid & fixed event delegation