Plugin NPO: minor cleanup.
Plugin NPO: separated metadata function + added user-agent headers.