Removed dead code.
Added testcases for optimizer.local.