use separate function for setting route parameters
Updated tests
Merge pull request #501 from mvrhov/routeParameters

use separate function for setting route parameters