Split the shortcut uri lookup into two functions.

This make the code easier to read and make the way to add different parameters
in the template.