Refactoring eventstore.c into disparate read and write feature sets