media queries and code cleanup