fix routing, cleanup