Got the generation of sparse arrays to work...finally...needs some more tests though...