Added preRouteHook and documentation for hooks