EGL refactoring + fixed failing tests.
25 files changed