Another attempt to implement device (layer) navigation. API still not fully functional but keep code.