Refactor configuration mechanisms