Added the ability to choose the type of route