Make arguments mutable and fix types for Windows