Added documentation to code and README

Added basic documentation and code comments that describe the included
functions