start of cleanup based on Mike's feedback. To be rebased.