Renamed setResponseObject to attachResponseObject
Moved content to a separated class