Made a start on media query stuff, some refactoring and added inArray helper function