Added Pinwheel code, whole system now working