Code cleanup, trying to implement sync_folder

And here I am, reaching another point, when I realize that Windows
SUCKS. File uploading still broken. Source is ok, but won't work. Why?
Because it's Windows. There is no other explanation.