Manual merge

Probably because of previous revert/rollback the branches were
completely incompatible, with files missing here and there. I did a
manual copy/paste of files into the master, hopefully this will work.