Adds screenshot function.
Fixed indentation