update foundation
cleaned up activation and rewrites