Started work to make all sample code mac compatible