Rebuild with Joi

Sick validation!
Merge branch 'joi-validation'
commenting clean up
Config for detail records

Also separated out parse functions to their own module.