Reordered stuff and added OSX specific shit