Updated and enhanced and removed deprecated functions