Moved router out into module