Code refactoring for option storage