Slightly DRYer
Refactor optimizer backward-compatibility