screen sharing refactoring