Collapsed 3 initialize variants for checking params
Refactored to be a little cleaner. Also pulled route_specification into before loop as it's the same