Added optimize command