Lots of changes to support digital IO on New Zealand telescope