Repair broken merge and merge again

* Repair broken merge fc88e97
* Fix changes up to 555c868