Fix typo in make_tags, correct the exclude function, comment, and add checks