Added comments and outputs responses to the console
Fixed log messages and added comments