moving optimizations and their tests to the ops' files