Setting up data structures.