Improved documentation

-Added comments documenting the settings, functions, and globals