Added simple test, fixed wrong pointer to findMin