Cleaned up formatting and added comments to functions that were missing relevant summary/input/output information