Added new layers, updated layer change function