optimized writing spaces

Note: this code is untested, I just wrote it here on github without even launching gmod. You're gonna want to test it to make sure it works
Merge pull request #1 from Divran/patch-1

optimized writing spaces