fix route restrictions
remove trailing space
remove unused variable assignment
switch to new hash syntax