Small fix in codegen
Introduced the Reference class. All non-value objects inherit from this class by default.