Initial writer code.
Fix formatting.