Created functions to replace duplicate boilerplate data structures.