MaxProfit and UpdateCatch

Some bugs corrected, 'intensive' verification carried out