Refactored optandinit