Adds option handling to core.