Updated the shape and layer classes with more functionality.