Refactor screenshot classes to be more readable and maintainable.

Update tests.