removed main and some unused comments in SparseArray. wish i could have submit this code. much much better compared to initial submit.