Align code on 5.7-SNAP, use metrics, fix ehcache init