update gitignore for win32 systems
change function declarations to avoid hoisting