Create generic function calc max / min by using apply().
Move Directory.