Throw an error when bad setting passed.
Cleaning up stuff as we use it.