Various bug fixes and XML comments (see README for 1.0.1)