Deprecation fixes / code format consistency