lots of changes hopefully last commit for the day.