Add comments. Update code style.