It's very clear that this was planned, possibly well in advance. The potential that this was a Muslim extremist attack can't be dismissed at this point, but then it's also entirely possible that a devout Muslim can shoot up a place for a reason other than their religion (though if I had to guess, I'd say it's more likely that religion did play a major part in this).