Add comments. Update code to use new Client