Cleaned up the capture script and the clean script (which was broken for
frames)