Added requests handling and structure change

try to avoid variable name 'obj', 'object'. It tells us nothing. After several lines i will forget what is 'object'. You can call it $controller. And the var above called $contoller can be $controllerName. Or use '$controllerInstance' for '$obj'.