Refactored event-sourced aggregate factory