Added docstrings and imported from Layer class.