Convert $obj to a lexical.
Refactored.
Made earlyvalidate a method.