Minor refactoring around last commit to make computer test pattern reusable.