Made offload working; basic optimizations (inout->out, host-side if).