Removing redundant code after API update