Removed debug print statements and DB access thread