Fixes for errors/additions suggested by jerith.