Managing global and singleton objects