added missing check for response_type (2nd notice) and some code style fixes