Changed database constructor for singleton model.