Port of lost changes

Recovered lost changes, replied Mario pull request on top of that.