partial implementation of Layer
implemented more of layer class
added more functionality to layer