moved onload to body
added hit tracking
added missing require
added Content-Disposition header