Added 'securedownload:' tags to all debug messages for grepping
Also some minor formatting cleanups