Pulling changes from official cornice

I suppose this will merge last changes from cornice into my own repo