code cleanup to build with AppVeyor