Refactored dependencies on PFM and implemented sth

Implemented naive case for insertEntry and write some structs