Creation of 'max', 'min' and 'average' methods.