Updates singleton pattern to prevent direct calls to the constructor method.