Merged changes
- Made buffer flush on new lines
- Added nice send functions