Enable third capture mode...

... and also move code to functions so as to reuse