A Lehigh County man accused of killing his neighbor with a homemade air gun was in court Thursday afternoon for his preliminary hearing on a homicide charge.

Josef Raszler became "obsessed" with Stephanie Roof after a failed relationship, prosecutors said, and is accused of shooting her Sept. 13 in her Lower Macungie driveway.

He has been held without bail on a a single count of homicide since his arrest April 5.

Raszler lived across from the 46-year-old Roof and her family on Pinecrest Lane in a home with his parents. Prosecutors said he and Roof had dated, but that Roof broke it off in the summer of 2015.

Raszler sent Roof hundreds of unsolicited text messages from July 2015 through October 2015, troopers said. Roof had kept an old cellphone that had the messages on it, and troopers found it after her death.

In the messages after the break-up, which troopers said Roof did not respond to, Raszler tells Roof "I swear it will catch up with you :'( It happens on his time...not ours. I was a perfectly good person just trying to help and now my soul has holes I can't mend."

On Oct. 15, 2015, Roof finally responded to Raszler, telling him he had sent 250 messages that were "vile, abusive, threatening, denigrating, slanderous and very intimidating," records state.

Roof said if the messages continued, she would call the police. State police said Raszler indicated he needed help, but he blamed Roof for his state of mind.

Seven months later, prosecutors allege Raszler began buying the components to build a homemade air gun to kill Roof.

Investigators found internet searches on Raszler's laptop for "high pressure air pumps for rifles," "high pressure air pump gun" and "most powerful air rifle," District Attorney Jim Martin previously said.

Troopers also found numerous tools and equipment, including copper pipe, air tanks, a copper barrel pipe with an air gun trigger and large amounts of melted and bulk lead, similar to the metal projectile that killed Roof.

Prosecutors have not recovered what they believe is the murder weapon, but Lehigh County Detective Mark Garrett, commander of the county's firearm and tool mark laboratory, recreated a weapon based on the instructions allegedly found on Raszler's laptop.

Prosecutors allege the weekend before Roof was killed, Raszler practiced shooting the gun at his parents' lake house in Schuylkill County. Troopers found homemade metal projectiles, one of which is similar to the one found in Roof's yard, as well as a wooden target and a tarp marked with holes.

Sarah Cassi may be reached at scassi@lehighvalleylive.com. Follow her on Twitter @SarahCassi. Find lehighvalleylive.com on Facebook.