Created LED class and cleaned up main program