restructured optimization runner; code style