Added twig extension to handle flash messages