Although there are no strict rules when it comes to laying out the modules for a program, here are some general guidelines:
The number of public functions in a module should be small.
The information passed between modules should be small.
All the functions in a module should perform related jobs.
Modules should contain no more than 1,500 lines. With more lines, they become difficult to edit, print, and understand.