update to ES 1.2.1, some refactoring
Merge remote-tracking branch 'origin/master'