Move all middleware to separate files