Abstracting away the deprecatedItems

Closes #4189

* moved `deprecatedItems` from within the function to the default config object
* added tests (config object can not be unset / reset)