4.0 Final

Too many commits.