Explain the data structures a bit in comments.