Small improvements suggested by Tarmo.