adams pull request

Some of my changes might need review.