Fixed 'show destroy' omission

Hi Patrick,

I fixed the bug associated with the destroy button in the show template, and I simplified some of the generated code.