Fixing warnings
Removed deprecated functions