Rewrite slice / range projection functions; fixes matrix_operations test failure