Lots of magic. TL;DR compiles on windows now