organizing code

Hi. I have written a lot of line codes among the main routine and several functions in the same .C file which makes very annoying the process of debbuging and modifying the code. I would like to know which whould be a good programming technique to organize my code.