Minor improvements, mostly style and deprecations