Added documentation and updated README.