Refactor option handling to be named
Added coalescing functions
Refactor type conversion code
Refactor validation handling