Would have been nice if the sample code was a little more clear. Still, I managed a successful application of the Sierra On-Line Adventure Game technique of problem solving: try random things until it works correctly.

Click image for larger version. 

Name:	Delta_Optimizer_wTabs.png 
Views:	373 
Size:	754.4 KB 
ID:	113367