Implementation of 'invert' finished off