I was over-aggressive with my deletions, I had taken out some needed 'end' statements