Added some functions for device layers.