Added some toggling layer functionality