Added option to hide the sidebar information on the attachment page and small clean up in the code.