:gb: Refactored out layer parsing to updateLayers method.