Minor improvements and some TODO markers.