various corrections/improvements