Improving documentation and adding tests which will be run automatically when running 'make all'.