Minor structural changes.
Merged master from repo.