Big pull request.

Big pull request.