Set up data and functions.