Adds modes to template and router