Added singleton functionality.