More functions for device layer navigation. Some cleanup.