Merge branch 'master' into cleanprog-mitya

Also, remove ALTERNATIVE_OUTPUT define and fix the test.