Push more logic to config