Programming languages are meant to communicate a solution to another human through a conversation that a computer is barely smart enough to understand. If you can't even understand your own code, then it doesn't communicate a solution. It may as well have been a bunch of raw hex digits, which would at least be convenient for the computer. I agree with the earlier poster - toss and rewrite. But this time imagine that a sociopathic homicidal maniac who knows where you live will be the next one to have to understand your code.