Merging

Pulling in Riccardo's branch changes and building upon them to improve windows support.