added protected Variable
added cleanup method to base class of layout