Replace all deprecated ASM API usage, and a few others