code cleanup / added interface for hardwareLayer