Refactored the code.Removed some req.underscore.