Fixed up compilation issues with es 0.90.6. There are test failures now.

Not sure what the test failures are. Pushing this back to the repo.