Added a a method to remove hidden layers