Add comments. Minor organization changes.