The previous incident of a weapon discharge does sound plausible as a mistake when cleaning, though there was conflict with the upstairs neighbor and time to plant evidence of weapon cleaning.
This incident lead to his discharge from the Navy. Which makes me think that there might have been more to the story- maybe not enough more to support criminal charges, but if he was taking reasonable care and something just went wrong, that wouldn’t be discharge worthy- at least not for someone with an otherwise clean service record.
This sounds like just a pissed off guy shooting up the place that fired him. *Probably* not terrorism, though I hope the investigators are still looking just in case.