Redesign DefinedClass, to have instance methods instead context