Fixed or removed some deprecated functions