Using sparse data structures throughout