Refactored error messages.
Require middleware for checks of settings that use them.