Implementation of double check locking singleton pattern

Change the type of OBJECT and GetInstance where required