replace "optional" and "required" config with optional() and required() marker functions
object sanitization, improved error handling