Updated the documentation files.
Unit tested functions.