rename metadata to state and pnexpires to heartbeat