* replaced misc uses of scalar_type with decayed_scalar_type so that it should work properly with reference vectors now
 * vector ref now also accepts '0', '1', '2' and '3' (for completeness sake, should use ref_idx instead though)