Made database instance into a singleton.