Added doc-strings to all functions