Updated depreciated function, removed unused imports and player