Major refactor to use DI (electrolyte)