code clean up for the router template section