Numerous fixes found during Karaf integration