fixed errors in ArrayDivider
fixed errors in Optimizer + tests