lots of changes to get things working again.