First version of screenshot code