Implemented functions, added documentation/comments and added
information on testing the functions