Finished docs

Added docstrings to all major functions. Woo-hoo.