moved some logic from Router to Hahns
optimzed imports