Small updates

Extracted the good parts from the other PR, plus a micro update of Karaf