Added loading of V and e; some logging, some reorganization of logic