Microstructural characterization of carbon films and CNx films produced by N+ implantation