Updated the reprsentation of Sparsity. Completed test of sparsity api.