moved router and history to a module