Replaced CursorAdapter with custom array adapter.
Refactored database access.
Refactored database access.