Middleware unit test; Cleaned up comments;