Apart from XDebug, I've used log4php on occasions to just log an application's flow to a textfile. This will help you in making a map of the files/functions, and what is called in what order.
If you come across a piece of code that is repeated, make a new file and put the function there, in your own coding style and remove the others. Step by step rebuilding the code in your own style will help make things simpler in the end, in my experience anyway (whether it is function or OOP).
If not there already, implement decent fault handling and logging.
pritaeas
Posting Prodigy
9,268 posts since Jul 2006
Reputation Points: 1,173
Solved Threads: 1,457
Skill Endorsements: 86