Added comments to script and began preparation for unit testing