Adding userdefined routes and fixing bug in links