clean up and upgrades