Re-added original script for keyframes, and improved the way media queries are sorted