Add ES re-factoring branch

This commit adds the re-factoring branch to the ES