Added more comments to the code and i have added two LEDs at the start of the program so the raspberry pi has time to boot