Refactor to clean up parameter extraction.
Created @unmarshal_with() decorator for input field parsing