Added response codes & some code style changes