CRAY - Simplify code a bit.
CRAY - Fix to allocate the correct type