Remove deprecated methods / function

flake8: at least two spaces before inline comment (not sure if you guys use it and/or ignore that error though)