Restructured legacy writer a bit