Moved led handling to a separate file