Warnings and deprecations fixed