Analysis of annealing and ion implantation effects in Ti/TiN contacts on silicon