Remove returnType, argType, contextType from Spec.
Add resolveType to infer type.
Fix Arrays being treated like records.
Fix type sorting bugs.