changed twig to JSON response, cleanup