Merge in latest changes.

Fixed quality, cleaned up code, etc.