Josh Powell tried to kill his two young sons with a hatchet before the flames of the fiery explosion he had ignited engulfed them all, police said today.

Powell, 36, failed to kill his sons Charles, 7, and Braden, 5, but still wounded them horribly before they died -- smoke in their lungs -- in the gas-fueled explosion Sunday, according to police and the medical examiner. A funeral for the boys will be held Saturday, at the Jesus Christ of Latter Day Saints Stake Center in Puyallup, and is open to the public.

Just days before he killed himself and his two boys when they came to his Graham, Wash., home for what was supposed to be a supervised visit, Powell gave away his children's toys, police said today.

Powell also sent long emails detailing what to do with his money, house utilities, and other aspects of his life to cousins, his pastor, and friends just minutes before he ignited the explosion that killed himself and his children and left his house a charred ruin, Pierce County, Wash., Sheriff's Department Det. Ed Troyer said today.

In the emails, Powell said he could not live without his boys, Charles, 7, and Braden, 5, Troyer said.

He and the boys were found in the center of the home, next to one of two 10-gallon cans of gas in the house, Troyer said.

Autopsies were being performed today, and police expected some results by tonight, Troyer said. There were no weapons found and no evidence of gunshot wounds on the bodies, he said.

Investigators are trying to determine when Powell began planning the murder-suicide by finding out when and where he bought the materials for the explosion, Troyer said. The toys were donated to Goodwill days before the deaths occurred, he said.

Josh Powell Was Relaxed Before Murder-Suicide

Just a week before the explosion, Powell had told ABC News he was optimistic about the future and was looking forward to a day when he would regain custody of his boys.

Powell spoke with ABC News shortly after a court hearing Wednesday in which he was ordered to undergo psychosexual testing before he could regain custody of his sons.

Less than a week later, Powell let his sons into his house for a supervised visit, but shut and locked the door before the social worker could enter. Moments later, the house smelled of gas and erupted in a ball of flames. The two boys and Powell died in the explosion.

In his final conversation with ABC News, Powell said he had no idea what images had been found on his hard drive that prompted the court to keep his children away from him and order him to undergo a psychosexual examination.

Despite the court ruling, Powell gave no indication of the rage that would drive him to blow up himself, his children, and his home.

Rather than being angry or upset by the court order, Powell was calm and more relaxed than usual and was optimistically looking forward to when he would regain custody of his sons.

Powell had been under investigation since the disappearance of his wife, Susan Cox, in 2009. Police had name Powell a "person of interest" in the case, but he was never charged in his wife's disappearance.

He lost custody of his children after his father, Steven Powell was arrested on child porn charges last fall. Josh Powell and his sons were living with Steven Powell. At the hearing Wednesday, a letter from police said that images found on Josh's computer were concerning for the welfare of the children.

Powell told ABC News that he had no idea what the images were, and wondered why police were bringing them up now, two years after they were reportedly found on his computer. He said he did not remember any inappropriate images at all on his computer from that time.

Powell also said he regretted the fraught relationship between his wife's parents, Chuck and Judy Cox, and himself in the years since Susan's disappearance. He said he was actually happy that his children had their maternal grandparents in their lives, a significant reversal from earlier statements in which he disparaged the Coxes and said they were poisoning the children with hatred for him.

Kids Claim Susan Powell Was in the Trunk

According to an attorney representing Powell's in-laws Chuck and Judy Cox, one of the young sons was beginning to verbalize details about the night their mother disappeared, including an allegation that Susan was in the trunk of the family car, and disappeared shortly after they arrived at their campground.

"They were beginning to verbalize more," Steve Downing said today. "The oldest boy talked about that they went camping and that mommy was in the trunk. Mom and dad got out of the car and mom disappeared."

The boys were 2 and 4 at the time of their mother's disappearance.

In his final conversation with ABC News before his death, Powell continued to talk about his wife, Susan, in the present tense as if she were still alive. Susan has not been seen or heard from since 2009, but police have never found evidence that she is dead.

Josh also repeated his claim that his wife was a very sexy, flirtatious person. Powell's father Steve Powell had even claimed she had flirted with him.

During his conversation with ABC News last week, Josh Powell said he didn't visit his father in jail very often, and said was disappointed that his father claimed to be receptive to Susan's alleged flirting.

In the summer of 2011, police searched the Washington state home where Josh and Steve Powell lived with the two boys. Steve was subsequently arrested and charged with child pornography and voyeruism.

The explosion Sunday at Josh Powell's home was purposeful, according to Pierce County, Wash., authorities. The social worker who brought the children to a supervised visit at Josh's house was locked out of the home by Powell. She immediately smelled gas and called her supervisor to report it.

Shortly after, the home exploded.

Josh Powell's lawyer, Jeffrey Bassett, said he received an email from his client minutes before the explosion that said "I'm sorry, goodbye," but he didn't see it until two hours later, when he was informed of the blast.

Bassett told AP he knew his client was upset about being denied custody of his sons at a court hearing last week, when he was ordered to undergo a psychosexual evaluation and polygraph test in order to get them back.