Changed singleton pattern to use dispatch_once.