Big clean up on router and controller