Convert database manipulation to use ContentProvider