Added the response object and formalized the conroller actions