Fix bug in Sparse.reallocate()
Rename variables for better readability
Enable argument checking when allocating memory