Refactor ScreenCapture