Added -Wall option and solved some related warnings
Prints buffer only at the end of request
Merge partially pull request #5