Adding Singleton macro REGISTERSINGLETON which prevents more than one object from being constructed.