(feat) Added Persistent Middleware

Some comments would be helpful