Refactor code from operator to ScreenShot class