Documented Terminal

Finished documenting terminal and did some modifications to some of the
functions. No functionality was changed.