Refactored the existing 'show generated code' javascript, added new links for displaying the generated code.