Fixed binary files support
Cleanup, indenting