Made optimization mode a constructor option.
Added performance tests.