Initial commit of working code for IVA 2012 conference