moved compiled specs, some refactoring in layer