Move utility function getParameterByName() into the scope where it's needed.