Initial commit ported from event-store