Clean up exceptions
Make each valid() function set self.val to the validated form of arg
(float or int or boolean if appropriate)
wip
Cleanup args, commented code, etc.
validate() returns dict, main loop adds 'opcode', and JSON is printed
Better explanation of valid/validate