Minor improvements and python3 compatibility notes.