Reworking writer factory to not be necessary