Moved all middleware configuration into separate files to improve readability.