Refactor audio viewer related code.