The emotional state of the gunman in the Navy Yard shooting has emerged as a central element of the investigation, with questions being raised about why Navy contractor Aaron Alexis retained a security clearance despite a background of psychiatric problems.

The more investigators learn about Aaron Alexis from police, military, and medical records, the more questions come up about why he retained his security clearance and the badge that allowed him to enter a Naval building in the U.S. Capital and kill 12 people.

Rear Admiral John Kirby, a spokesman for the Navy, said this is among the matters being looked into.

"Investigators are looking at this background very carefully. We in the Navy are also taking a look at his time and service in the Navy to see if there is anything that we missed that maybe we need to have addressed a little bit differently, " said Kirby.

Alexis had run-ins with the police, including gun offenses and misconduct while he was in the Navy, and more recent reports of psychiatric problems. He told police recently that he was hearing voices, information that police say they relayed to the Navy.

He also sought treatment at a government-run medical facility for veterans.

That, before going to gun store and buying a weapon to carry out the shootings.

Defense Secretary Chuck Hagel has announced a broad investigation to see where the system failed.

The shooting raises further questions about the military's screening for mental illness.

Last month, former Army intelligence analyst Bradley Manning, who had been diagnosed with gender identity and anxiety disorders, was sentenced for espionage for the largest leak of classified information in U.S. history.

Barbara Van Dahlen, a clinical psychologist, founded an organization that provides mental health services to veterans and believes the problem lies in recognizing the importance of mental health.

“Our country is not very good at recognizing mental health as part of overall health so it's not just a military issue. We don't often feel comfortable raising our hand and saying, 'gee, I'm depressed or I'm anxious. I need some help.' Within the military, even more so. There's an ethos of 'be tough, handle things,'” said Van Dahlen.

Alexis was never deployed to Iraq or Afghanistan and there are no indications he suffered from post-traumatic stress disorder. But Van Dahlen said reports of hallucinations and his recent visit to a hospital emergency room with complaints of insomnia could have triggered a closer look.

“You know, sleep disturbance often tells us, there's something going on, what is that about? What is the agitation about? And so we need to do a better job, and there's a lot of effort under way,” said Van Dahlen.

The Defense Department is now taking a hard look at how its screening process can spot warning signs. Secretary Hagel said the Pentagon will be looking for what went wrong and where.

“Why they didn't get picked up, why they didn't get incorporated into the clearance process, what he was doing, those are all legitimate questions that we're going to be dealing with,” said Hagel.

With Aaron Alexis, none of the problems, taken individually, was enough to revoke his building pass and security clearance. Now, officials are rethinking the process with the hopes of averting another tragedy.