Splitting functions into maintainable files