Hotfix for ending parts

Copied from the pseudo-code plan so there were 'ending:' tags (that mean
nothing to the compiler!) removed these, it should run fine now.