Added docstrings to Gate.