Added close() to handling layers