SIM card issue with Arduino uno

Does getting rid of the code for diddling with the LED and reading switch states make any difference?

Every AT command causes a response from the modem. ASSuming that each returns OK, and that you can send the next one is NEVER a good idea.