Fix LED toggle issue and gigantic refactor FTW