Trim all setting values; Improve URL matching