transforms/inline: rewrite
coredevice/core: optimize further