Moved pasteboard observing code to its own class.