Docstring improved unused variables removed