Upgraded foundation version + minor fixes