TUCSON, AZ --An initial portrait of a the man accused of shooting Arizona Rep. Gabrielle Giffords in the head in an attack that also killed six people outside a Tucson grocery store slowly began to emerge Saturday, as authorities described a young man with a troubled past and neighbors recalled a 22-year-old who often kept to himself. One former classmate said the accused gunman, Jared Loughner, often did his own thing. Another described him as a student who disrupted class with occasional outbursts. Neighbors said Loughner wasn't hostile toward anyone but certainly didn't warm up to anyone, either. "He was a guy in high school who definitely had his opinions on stuff and didn't seem to care what people thought of him," said Grant Wiens, 22, who told The Associated Press he went to high school and had a class at Pima Community College with Loughner. Loughner was in custody Saturday after authorities said he opened fire outside a grocery store as Giffords, a Democrat, met with voters. The rampage left the congresswoman wounded. Arizona's chief federal judge, a 9-year-old girl and four others were killed. Authorities said the accused gunman targeted the three-term congresswoman, but an exact motivation was not immediately known. Many questioned whether the nation's polarized political climate had played a role, even as Loughner's political views remained unclear late Saturday. Pima County Sheriff Clarence Dupnik described the gunman as mentally unstable and said he possibly acted with an accomplice. Federal law enforcement officials poured over versions of a MySpace page that belonged to Loughner and over a YouTube video published weeks ago under an account "Classitup10" and linked to him. The MySpace page, which was removed within minutes of the gunman being identified by officials, included a mysterious "Goodbye friends" message published hours before the shooting and exhorted his friends to "Please don't be mad at me." On his MySpace page, Loughner spoke of how he liked to read and he also wrote repeatedly about literacy, complaining that the rate was especially low in the congressional district where he lived. "The majority of people, who reside in District-8 are illiterate hilarious. I don't control your English grammar structure, but you control your English grammar structure," he said. In an interview with The Associated Press, Wiens also said Loughner used to speak critically about religion. He also talked about how he liked to smoke pot. "He wasn't really too keen on religion it seemed like," Grant Wiens, 22, told The Associated Press. "I don't know if floating through life is the right term or whatever, but he was really just into doing his own thing." Loughner's MySpace profile indicated he attended and graduated from school in northwest Tucson and had taken college classes. He did not say if he was employed. Tamara Crawley, director of the Marana Unified School District in Tucson, said Loughner attended Mountain View High School in Tucson for three years but withdrew after completing his junior year in 2006. Crawley did not know why Loughner had withdrawn from Mountain View High and it was not clear if he had transferred to another school in the area. Lynda Sorenson said she took a math class with Loughner last summer at Pima Community College's Northwest campus and told the Arizona Daily Star he was "obviously very disturbed." "He disrupted class frequently with nonsensical outbursts," she said. In a Dec. 15 YouTube video, Loughner describes himself as a U.S. military recruit. The Army released a statement indicating Loughner was not accepted. In October 2007, Loughner was cited in Pima County for possession of drug paraphernalia, which was dismissed after he completed a diversion program, according to online records. A year later he was charged with an unknown "local charge" in Marana near Tucson. That charge was also dismissed following the completion of a diversion program in March 2009, the Daily Star reported. Ryan Miller, 19, was a sophomore at Mountain View when Loughner was a senior. He said Loughner was seemed like a normal kid. "I was in shock," he said, describing his reaction to the shooting. "I didn't know what possessed someone our age to do something like this." AP Source: Gun in Tucson shooting legal A law enforcement official tells The Associated Press that the handgun used in a shooting that killed a federal judge and wounded a U.S. congresswoman in Tucson, Ariz., was purchased legally. U.S. Rep. Gabrielle Giffords was shot in the head Saturday morning during an event with voters outside a local grocery store. U.S. District Judge John Roll, and at least five others, were killed in the attack. The official, who has been briefed on the investigation, spoke to the AP on the condition of anonymity because he was not authorized to discuss details of the case. Officials have identified the shooter as 22-year-old Jared Loughner of Tucson. He is in custody. The Washington Post reported late Saturday that Loughner purchased the gun Nov. 30 from the Sportsman's Warehouse in Tucson.