Added Some Documentation

Various documentation added to some functions for clarity.