foundation update plus minor fixes