router cleanups and fixes