Applying new code style
Reworking Write Thread