Simplified Media Query Logic

Made a few adjustments that simplifies the media query logic and also allows for more than two sets of media query constraints to be passed in.