Changing the singleton to suit single-threaded applications