Restructured and completed reader and first writer implementation.