Added support for singleton classes