public function launch()
	{
		// Was the application route defined?
		if ($this->_app_root === null) {
			throw new FemtoException('You must define the application route first, do so by calling $femto->setAppRoot($dir)');
		}

		try {
			// Load the page, if one isn't specified in the request load the index page
			$this->_request_uri = str_replace(array('?', $_SERVER['QUERY_STRING']), '', $_SERVER['REQUEST_URI']);
			$this->_loadPage(trim($this->_request_uri === '/' ? 'index' : $this->_request_uri, '/'));
		} catch (FemtoPageNotFoundException $e) {
			// Set a 404 header because we couldn't find the page
			header('HTTP/1.1 404 Not Found');

			// We need to reset the template state
			$this->_resetTemplate();

			// Make sure the 404 is maintained if the 404 page doesn't exist
			try {
				$this->_loadPage('404');
			} catch (Exception $e) {}
		} catch (Exception $e) {
			// Discard the output buffer, we don't want to display content
			// if an exception was caught
			ob_end_clean();

			// Let the world know that you messed up
			header('HTTP/1.1 500 Internal Server Error');

			// We need to reset the template state
			$this->_resetTemplate();

			// Load the 500 page, if this fails it doesn't really make any difference
			$this->_loadPage('500', array('e' => $e));
		}
	}