Improvements suggested by Matt