Added better handling for optional values and also added extracting entire chunks of route fragments