Added comments

Added comments to try to explain the code better, as well as talk
briefly about how we would improve this code in the future.