Clean up more compiler warnings and deprecated functions