randomizing header paragraphs, moving script into global object