Solve deprecation warnings
WIP