Cleaned up prototpe reduction arrfunc