Added documentation to CTF

Added docstrings to CTF.