Better sharedInstance management - Credit to uroboro