Fixed URL parameter parsing

Updated if statements with more cases and fixed error with not properly
reading in query parameters.