refactor all test code and move eve.js out