Route segments behavior moved to own js file and modified templates accordingly
Fix comments