Man accused of killing attorney pleads guilty to 2 counts, will go on trial for homicide charge