Added InstanceOptimizer class