Extracted panel code into a seperate box.html.erb template, and refactored the show page appropriately.