Refactoring the class to access the database.
forEach utility
Fixing issue in body parser.
Moving DB query generation for suggestions from client to server.