Remove dependency on pkeyData

Remove dependency on pkeyData
Memory fixes

Memory fixes