Functions should not be inside other functions, and related functions should be neighbors.