[INCOMPLETE] Layer class introduced with better encapsulation.