Started the Buffer writing of the PID code (see notes on code)