remove obsolete layers