Maybe I don't undestand fully, but it looks to me that `Layer` is never used directly but only as _base_ for the other encoders. If so, this could be a simple static functions. Something like:
```
var baseEncoder = function(layer) {
...
}
```

Then all others could just call `var enc = baseEncoder(layer);` which would be a little more clear than `$scope.encoders.layers['Layer'].call(this, layer);`

What do you think?