Various tweaks to try and deal with type errors from compiling code using simd types

I haven't actually managed to fix anything to do with type errors but
there are some other minor changes