A little cleanup

To avoid the use of deprecated methods