Fixed bugs in sparse array; got it to work, but need to finish unit test