refactor configuration_spec a bit