minor improvements to asm and asm code