Implemented some additional validation and framework for parse functions.