fixed inline asm, cleaned up headers