renaming middleware and using more idiomatic featuers for middleware options