Minor code details changed.