Implementing Singleton in magics classes