Modified to reflect usage of pypaperclip and put all code in one block