Added better parameter and URI handling