Some minor code improvements.