Some tidy up from 6513c96cd6