Refactor existing API to use the new DatabaseHelper