Pulled out the conde that what writes layers as part of refactor