uart assembly and clean up