Tidy js routing