Merging in upstream changes.

Merging in upstream changes from csdl/makahiki and master.