Convert class to singleton