fix sime bugs in the popup (can't console.log() in the popup), and add a clear log button