Foundation5

Fixed several different problems and updated to Foundation 5.2.3.