Feature/tweak config format

Change middleware to use an options hash for config assignment. This is mostly a future-proofing change as some options may be specified outside of creating a whole config object in the future.

Still supports the old format since it is in use in the wild.