Remove deprecated API usage, cleanup