Refactoring in prep for cassette changing.