Create structs and function definitions