template_periph16b fixes/improvements