Refactor configuration parsing and configuration cache