Merge windows+cc branch into cairocanvas branch. Not finished, need to now merge...