Refactored Code//Added Media Queries