Refactor handling store configuration