Refactoring layers. Added features.