Correct handling of URI parameters

Refs #5
Merge branch 'issue_5'