Cleaning up DB Queries