Rewrite router class