Work in progress; all tests pass
Re-worked logic for building URIs with parameters to be more flexible