Runtime improvements for ASM. Various fixes. Testing is not working yet.