(feat) Added Persistent Middleware

This should be included in this PR.