Refactored ELCompiler. Resolves #1951