Fix majority of compile issues for windows
Fix building on windows, move some things
Add a way to safely free renderers