almost complete rewrite, making Eve more modular