refactoring - layerStyle.js