protected function render($view, array $data = [])
    {
        // Extract variables.
        extract($data);

        // Start buffering.
        ob_start();

        // Load view file (root location is declared in viewPath var).
        include $this->container->get('config')['viewsPath'] . '/' . $view . '.php';

        // Get buffered content
        $body = ob_get_contents();
        ob_end_clean();

        // Make response and add body to it
        $response = new Response();
        $response->writeBody($body);
        return $response;
    }