Created basic min and max functions.