Fix errors and deprecation warnings

Line is too long. [102/80]