Man charged in ex-girlfriend's death goes to court