Create Response object and small refactoring inside framework