More minor code refinements