This is a pretty minor point but the `layer` pointer should be before the other attributes of the layer. 