remove some cruft, add some comments