Move router worker to separate file