New version based on ol3 trunk