Added documentation to most of the files, header documentation and more function
documentation is needed.