Refactored screenshot