Grouping sub routines by function