Big refactoring.
Move http require in ev.