Incorporated NICTA solutions (*after* I did my own).