Performance fixes, test for appveyor