compile_definitions for objects that aren't schemas
refactored for clarity
fixed a problem related to attr declaration
fixed draft3 support after refactor