refactoring manager/siteaddon stuff and some startup functions