Remove unnecessary includes.
Rename writefunction and change layout slightly.
A better example.