Added support for calling methods in the generated class