Added comments

Added a few helpful comments and doc strings.