Modified singleton pattern.