Fixing Issues with Deprecated Functions Throwing Warnings