Replacement of deprecated and undefined functions