converted spaces to tabs
split router snippet into when and otherwise snippet

also converted spaces to tabs