Merge "Refactor HardwareLayer"