Layer - refactoring

removing useless member variables, coding the accessors.