Refactor configuration into instance-based