Code refactor: change dispatcher to router