diff --git a/.gitignore b/.gitignore
index 6c7956e..bf9b71e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,85 +1,74 @@
-# Compilation artifacts
-*.o
-*.lo
-*.la
-
-# Editor swap files
-*.swp
-*.swo
-*.swn
-
-#emacs editor leftovers
-*.*~
-
-#diff leftovers
-*.orig
-
-# gtest pieces
-gtest
-gtest-1.7.0
-third_party.tar.gz
-testdata.tar.gz
-.tar.gz
-.zip
-
-# Other build artifacts
-/Debug
-/visualc/Debug
-/visualc/Release
-/visualc/gumbo.sdf
-/visualc/gumbo.opensdf
-/build
-.log
-.sdf
-.opensdf
-.deps
-.dirstamp
-.libs
-Makefile
-Makefile.in
-aclocal.m4
-autom4te.cache
-compile
-config.guess
-config.log
-config.status
-config.sub
-configure
-core
-depcomp
-gtest/
-gumbo.pc
-gumbo_test
-gumbo_test.log
-gumbo_test.trs
-install-sh
-libtool
-ltmain.sh
-m4/
-missing
-test-driver
-test-suite.log
-
-# gyp android artifacts
-gumbo_parser.target.mk
-
-# `make dist` artifacts
-/gumbo-[0-9].[0-9].tar.gz
-/gumbo-[0-9].[0-9]/
-
-# Python dist artifacts
-*.pyc
-dist
-build
-python/gumbo.egg-info
-python/gumbo/libgumbo.so
-
-# Example binaries
-benchmark
-clean_text
-find_links
-get_title
-positions_of_class
-prettyprint
-serialize
-well_formed
+# Backup files left behind by the Emacs editor.
+*~
+
+# Lock files used by the Emacs editor.
+.\#*
+
+# emacs auto recovery files from aborted edits
+\#*\#
+
+#use ful for stashing files
+*.orig
+*.keep
+
+# Temporary files used by the vim editor.
+.*.swp
+.swp
+
+# A hidden file created by the Mac OS X Finder.
+.DS_Store
+
+# Image thumbnail database created by windows
+Thumbs.db
+
+# Various files created by Visual Studio
+*.sln
+*.suo
+*.vcproj
+*.user*
+#*.rc
+*.ncb
+*.pch
+*.dep
+*.idb
+*.exp
+*.res
+*.manifest
+*.ilk
+*.pdb
+*.def
+Release
+Debug
+BuildLog.htm
+
+# Various files and folders created by CMake
+CMakeFiles
+CMakeScripts
+CMakeCache.txt
+*.dir
+ALL_BUILD*
+
+
+# Misc files
+*.svn
+*.a
+*.o
+*.obj
+*.lib
+*.exe
+*.dll
+*.a
+*.app
+*.xcodeproj
+*.pbxbtree
+*.pbxindex
+*.build
+*.smp
+*.pl
+*.pyc
+*.pyo
+*.orig
+*.bak
+*.rar
+build
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4c5a4ba..3995772 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -11,6 +11,8 @@ cmake_minimum_required( VERSION 3.0 )
project(gumbo)
+find_package(GTest)
+
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/.libs)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/.libs)
@@ -28,3 +30,7 @@ endif()
add_subdirectory(src/)
add_subdirectory(examples/)
+if( ${GTEST_FOUND} )
+ add_subdirectory(tests/)
+endif()
+
diff --git a/ChangeLog.txt b/ChangeLog.txt
new file mode 100644
index 0000000..98d6953
--- /dev/null
+++ b/ChangeLog.txt
@@ -0,0 +1,28 @@
+List of Changes since the Fork
+==============================
+In reverse chronological order:
+
+- change update foreign attributes to remove xml:base and add xlink:arcrole to follow whatwg spec
+- fixed minor memory leaks
+- correctly handle text in form elements
+- support for new tags including search and to better follow the latest whatwg parsing spec
+- fix for handling
and in foreign contexts
+- Fix multiple warnings including cast to enum from void pointer
+- Re-implement adjust_foreign_attributes() with a gperf hash
+- Remove special handling of