Foundation Update.
Made a ton of changes for filtering input/escaping output.