Setting up function definitions.