First cut of the code from Pixel