using this.layer everywhere rather than a locally scope alias of layer, doesn't make the code cleaner or easier to read and should be changed back to how it was.