I'm one of the more tolerant folk who are around, at least I'd like to think.
If the code you post sections of can't compile in a short example, perhaps you could post all of it within <readmore></readmore> tags, so we can see all of it.
It isn't my intention to put anyone off. If I came across that way, I am truly sorry. Given portions of an application that aren't copy/pasted properly into the site here, it is impossible to see what is wrong, especially when it is copy/pasted more than once incorrectly.
Paste it in within the tags I specified above, and perhaps someone will have the time to figure it out.