Carbon and vacancy centers in hexagonal boron nitride