Fix misnamed 'length'/'duration' variable.
Implement screenshot-taking function.