Decode end_layer.json
Refactoring