silence annoying warnings, and some tidying up in the area
merge bug25377 into default