Implements changes suggested by alikins.