Refactored down to build the first publishing engine