I thought I was doing a nice job, using comments and occasionally doxygen.
But a recent 'close to blunder' situation is making me rethink my practices.

I was writing a small interpreter and suddenly realised that I needed to change most of the class and function interfaces to use pointers instead of just copying a value (some unintended object splicing occurred).

After about 15 mins of trying to change the code to adapt to the changes, I realised that I needed to make the whole thing more loosely coupled into distinct modules (such that, say ..the expression evaluator, does not in any way depend on the inner workings of the lexer).
That invalidated some of my attempts in documenting what I did earlier.

Is there a way to make the process of 'updating' the documentation with code easier ?